<script setup>
import ChildComponent from "./ChildComponent.vue";
import { ref, provide, readonly } from "vue";

const xd = ref(0);
// const addClick = () => {
//   xd.value++;
// };
provide("xd", readonly(xd));
</script>
<template>
  <h1>父组件</h1>
  <ChildComponent></ChildComponent>
</template>
